From: Keir Fraser Date: Wed, 4 Apr 2007 21:47:20 +0000 (+0100) Subject: xen: No need for shadow_drop_references() in remove_page(). X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15264^2~25 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7ae14cd96984794b5dcbada72d7baa73ddbf010d;p=xen.git xen: No need for shadow_drop_references() in remove_page(). Because: guest_physmap_remove_page() -> p2m_remove_page() -> set_p2m_entry() -> paging_write_p2m_entry() -> shadow_write_p2m_entry() And shadow_write_p2m_entry() calls sh_remove_all_*() fns. Signed-off-by: Keir Fraser --- diff --git a/xen/common/memory.c b/xen/common/memory.c index 139a0e89b3..8fe4523582 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -173,12 +173,6 @@ int guest_remove_page(struct domain *d, unsigned long gmfn) if ( test_and_clear_bit(_PGC_allocated, &page->count_info) ) put_page(page); - if ( unlikely((page->count_info & PGC_count_mask) != 1) ) - { - shadow_drop_references(d, page); - /* NB: still may have foreign references to the page at this stage */ - } - guest_physmap_remove_page(d, gmfn, mfn); put_page(page);